# _*_ coding utf-8 _*_
# FILENAME：.py
# DESCRIPTION: 零件装载延误时间 Model
# AUTH: ZB
# DATE: 2022/6/2 10:00 下午

from sqlalchemy import Column, String, Integer, DECIMAL
from models.baseModel import BaseModel


## 零件装载延误时间主表
class PartsLoadDelayTimeModel(BaseModel):
    # 表的名字:
    __tablename__ = 'parts_load_delay_time'
    # 表的结构:
    production_line = Column(Integer, comment='生产线 1：焊装 2：涂装 3：总装')
    version_name = Column(String(255), index=True, comment='版本名称')
    factory_id = Column(Integer, comment='工厂ID')
    # 添加表注释
    __table_args__ = ({'comment': '零件装载延误时间主表'})


## 零件装载延误时间详情表
class PartsLoadDelayTimeDetailsModel(BaseModel):
    # 表的名字:
    __tablename__ = 'parts_load_delay_time_details'
    # 表的结构:
    parts_load_delay_time_id = Column(Integer, index=True, comment='零件装载延误时间主表ID')
    parts_code = Column(String(32), comment='零件')
    parts_name = Column(String(64), comment='零件名称')
    time = Column(DECIMAL(10, 2), comment='对应装配(分钟)')
    # 添加表注释
    __table_args__ = ({'comment': '零件装载延误时间详情表'})
